using System.ComponentModel.DataAnnotations;
using FytSoa.Common.Enum;
using FytSoa.Domain.Hr;
using SqlSugar;

namespace FytSoa.Domain.Crm;

/// <summary>
/// 客户-跟进计划
/// </summary>
[SugarTable("crm_customer_follow_plan")]
public class CrmCustomerFollowPlan:Entity
{
    /// <summary>
    /// 客户编号
    /// </summary>
    [Required]
    public long CustomerId { get; set; }
    
    /// <summary>
    /// 客户信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(CustomerId))]
    public CrmCustomer Customer { get; set; }

    /// <summary>
    /// 跟进项目
    /// </summary>
    [Required]
    public long ProjectId { get; set; }

    /// <summary>
    /// 执行人
    /// </summary>
    [Required]
    public long EmployeeId { get; set; }
    
    /// <summary>
    /// 执行人
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(EmployeeId))]
    public HrEmployee Employee { get; set; }

    /// <summary>
    /// 部门
    /// </summary>
    public string DepartmentName { get; set; }

    /// <summary>
    /// 计划内容
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 计划时间
    /// </summary>
    public DateTime? FollowTime { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public CrmFollowEnum Status { get; set; } = 0;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}